﻿
package com.victim.snake.room
{
	import flash.events.Event;
	import com.victim.snake.player.Player;

	//房间各种图片下载
	public class RoomEvent extends Event{
		public static const PlayerReady:String="PlayerReady";	//玩家准备事件
		public static const PlayerUnReady:String="PlayerUnReady";	//玩家取消准备事件
		public static const AllReady:String="AllReady";	//所有玩家准备玩毕
		public static const UnAllReady:String="UnAllReady";	//尚有玩家未准备
		public static const AddPlayer:String="AddPlayer";	//新玩家加入事件
		public static const ExitPlayer:String="ExitPlayer";	//玩家退出房间事件(服务器只会发来其它玩家退出房间的消息)
		public static const SetMaster:String="SetMaster";	//设置房主
		public static const ChangeMap:String="ChangeMap";	//地图改变事件
		public static const ChangeGameMode:String="ChangeGameMode";	//游戏模式改变事件		
		public static const ChangeModeCounter:String="ChangeModeCounter";	//游戏模式计数器改变事件
		
		public var room:Room=null;
		public var player:Player=null;		
		public var playerSite:int=-1;		
		
		//构造函数 (事件类型字符串，所发生事件的玩家)
		public function RoomEvent(type:String,room:Room=null,player:Player=null,playerSite:int=-1):void{
			super(type);
			this.room=room;
			this.player=player;
			this.playerSite=playerSite;
		}
	}
}